/*
 * Copyright (c) 2010-2021 Contributors to the Eclipse Foundation
 * 
 * See the NOTICE file(s) distributed with this work for additional
 * information regarding copyright ownership.
 * 
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0
 * 
 * SPDX-License-Identifier: EPL-2.0
 */

/* NumberSpinner - namespace "dijitSpinner"
 * 
 * Styling NumberSpinner mainly includes:
 * 
 * 1. Arrows
 * 		Outer containers: .dijitSpinnerButtonContainer|.dijitSpinnerButtonInner  - for border, padding and position
 * 		Arrows: .dijitArrowButton|.dijitUpArrowButton.|dijitDownArrowButton
 * 		Inner container: .dijitArrowButtonInner - for border, padding, width|height and background image
 * 
 * 2. Hover state
 * 		.dijitUpArrowButtonHover|.dijitDownArrowButtonHover .*  - for background color|image
 * 
 * 3. Active state
 * 		.dijitUpArrowButtonActive|.dijitDownArrowButtonActive .*  - for border, padding, margin and background color|image
 * 
 * 4. Focused state
 * 		.dijitSpinnerFocused .* - for background color|image
 * 
 * 5. Disabled state
 * 		.dijitSpinnerDisabled .* - for background color|image
 */
.oneui .dijitSpinnerButtonContainer {
  overflow: hidden;
  position: relative;
  width: auto;
  padding: 0 2px;
}
.oneui .dijitSpinnerButtonContainer .dijitSpinnerButtonInner {
  border-width: 1px 0;
  /* reserve space to match the oneui combobox button border with border and not padding to make IE happier */

  border-style: solid none;
  padding: 3px 0 4px 0;
}
/* button */
.oneui .dijitSpinner .dijitArrowButton {
  width: auto;
  background-color: #f4f4f4;
  background-image: -moz-linear-gradient(top, #f4f4f4, #dbdbdb);
  background-image: -webkit-gradient(linear,0% 0%,0% 100%,from(#f4f4f4),to(#dbdbdb));
  overflow: hidden;
}
.dj_iequirks .oneui .dijitSpinner .dijitArrowButton {
  overflow: visible;
  /* 0 height w/o this */

}
.oneui .dijitSpinner .dijitSpinnerButtonInner {
  width: 15px;
}
/* up & down button icons */
.oneui .dijitSpinner .dijitArrowButtonInner {
  /*border: solid 1px #ffffff;
  border-bottom-width: 0;*/
  /* 2 top borders = 1 top+bottom border in ComboBox */

  background-image: url("images/buttonArrows.png");
  background-repeat: no-repeat;
  height: 100%;
  width: 19px;
  padding-left: 0;
  padding-right: 0;
  /* for up arrow */

  background-position: -98px center;
  /* override button.css (TODO: move to Common.css since ComboBox needs this too) */

  display: block;
  /*margin: -1px 0 -1px 0;*/
  /* compensate for inner border */
}
.dj_ie6 .oneui .dijitSpinner .dijitArrowButtonInner, .dj_ie7 .oneui .dijitSpinner .dijitArrowButtonInner {
  margin-top: 0;
  /* since its bottom aligned */

}
.dj_iequirks .oneui .dijitSpinner .dijitArrowButtonInner {
  width: 19px;
}
.oneui .dijitSpinner .dijitDownArrowButton .dijitArrowButtonInner {
  background-position: -149px center;
}
.oneui .dijitSpinner .dijitArrowButtonInner .dijitInputField {
  padding: 0;
}
/** hover & focused status **/
.oneui .dijitSpinnerHover .dijitSpinnerButtonContainer,
.oneui .dijitSpinnerHover .dijitDownArrowButton,
.oneui .dijitSpinnerActive .dijitSpinnerButtonContainer,
.oneui .dijitSpinnerActive .dijitDownArrowButton,
.oneui .dijitSpinnerFocused .dijitSpinnerButtonContainer,
.oneui .dijitSpinnerFocused .dijitDownArrowButton{
  border-color: #aaaaaa !important;
}
.oneui .dijitSpinnerHover{
  border-color: #aaaaaa;
}
.oneui .dijitSpinnerInputContainerHover{
  border-color: #66d0e9;
}
.oneui .dijitDisabled .dijitSpinnerInputContainerHover,
.oneui .dijitReadOnly .dijitSpinnerInputContainerHover{
  border-color: #cccccc;
}

.oneui .dijitSpinnerFocused .dijitArrowButton {
  background-color: #f4f4f4;
}

.oneui .dijitSpinner .dijitUpArrowButtonHover, .oneui .dijitSpinner .dijitDownArrowButtonHover{
  background-color: #fefefe;
  background-image: -moz-linear-gradient(top, #fefefe, #cccccc);
  background-image: -webkit-gradient(linear,0% 0%,0% 100%,from(#fefefe),to(#cccccc));
}
.oneui .dijitSpinner .dijitUpArrowButtonHover .dijitArrowButtonInner {
  background-position: 2px center; 
}
.oneui .dijitSpinner .dijitDownArrowButtonHover .dijitArrowButtonInner {
  background-position: -49px center;
}
.oneui .dijitSpinnerFocused {
  background-color: #ffffff;
  background-image: none;
}
.oneui .dijitSpinnerFocused .dijitInputContainer{
  border: 1px dotted #000000;
  padding: 2px 9px;
}
/* mouse down status */
.oneui .dijitSpinnerActive .dijitInputContainer{
  border: none;
  padding:3px 10px;
}
.oneui .dijitSpinner .dijitDownArrowButtonActive, .oneui .dijitSpinner .dijitUpArrowButtonActive {
  background-color: #dbdbdb;
  background-image: -moz-linear-gradient(top, #dbdbdb, #f4f4f4);
  background-image: -webkit-gradient(linear,0% 0%,0% 100%,from(#dbdbdb),to(#f4f4f4));
}
.oneui .dijitSpinner .dijitUpArrowButtonActive .dijitArrowButtonInner {
  background-position: 2px center;
}
.oneui .dijitSpinner .dijitDownArrowButtonActive .dijitArrowButtonInner {
  background-position: -49px center;
}
/* disabled */
.oneui .dijitSpinnerDisabled .dijitArrowButtonInner {
  background-color: #f3f3f3;
}
.oneui .dijitSpinnerDisabled .dijitUpArrowButton .dijitArrowButtonInner {
  background-position: -98px center;
}
.oneui .dijitSpinnerDisabled .dijitDownArrowButton .dijitArrowButtonInner {
  background-position: -149px center;
}
.oneui .dijitSpinnerError .dijitSpinnerButtonContainer,
.oneui .dijitSpinnerError .dijitDownArrowButton{
  border-color: #aaaaaa;
}
/** hacks for browsers **/
/* for IE 7, when div is enlarged, 
 * should be no empty space between dijitInputLayoutContainer and dijitSpinner*/
.dj_ie7 .oneui .dijitSpinner {
  overflow: visible;
}

